#!/usr/bin/python3

import os
import logging
import logging.handlers
import datetime
import xml.etree.cElementTree as cET

from pwdBase import getPwd
from oracleDB import COracleDB
from log import CLog
from dbPool import *

# 表名
t_product_line="t_product_line"
queryAllTableSql = "select * from "

class CProductLineMgr:
    tableTitle = "产品线"
    def __init__(self, log):
        self.log = log
        self.productLine=[self.tableTitle]

    def init(self, db):
        self.db = db
        self.reload()


    def reload(self):
        self.productLine = [self.tableTitle]
        self.db.query(queryAllTableSql + t_product_line)
        rows = self.db.getData()
        for row in rows:
            self.productLine.append(row[0])
        self.log.log("load product line data finish")
